package com.xiaoma.feign;

import com.xiaoma.feign.fallback.SearchFeignServiceFallBack;
import entity.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import utils.R;

import java.util.List;

/**
 * @Author: xiaoma
 * @Date: 2021/7/13 15:45
 * @description:
 */
@FeignClient(value = "xiaoma-shop-elasticsearch",fallback = SearchFeignServiceFallBack.class)
public interface EsFeignService {
    @PostMapping("/search/product")
    R productGoods(@RequestBody Goods goods);
    @GetMapping("/search/queryProductGoodsInEs/{keyword}")
    R queryProductGoodsInEs(@PathVariable String keyword);
}
